Optimal. Leaf size=132 \[ \frac {C (b \tan (c+d x))^{3+n}}{b^3 d (3+n)}+\frac {(A-C) \, _2F_1\left (1,\frac {3+n}{2};\frac {5+n}{2};-\tan ^2(c+d x)\right ) (b \tan (c+d x))^{3+n}}{b^3 d (3+n)}+\frac {B \, _2F_1\left (1,\frac {4+n}{2};\frac {6+n}{2};-\tan ^2(c+d x)\right ) (b \tan (c+d x))^{4+n}}{b^4 d (4+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {16, 3711, 3619,
3557, 371} \begin {gather*} \frac {(A-C) (b \tan (c+d x))^{n+3} \, _2F_1\left (1,\frac {n+3}{2};\frac {n+5}{2};-\tan ^2(c+d x)\right )}{b^3 d (n+3)}+\frac {B (b \tan (c+d x))^{n+4} \, _2F_1\left (1,\frac {n+4}{2};\frac {n+6}{2};-\tan ^2(c+d x)\right )}{b^4 d (n+4)}+\frac {C (b \tan (c+d x))^{n+3}}{b^3 d (n+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 16
Rule 371
Rule 3557
Rule 3619
Rule 3711
Rubi steps
\begin {align*} \int \tan ^2(c+d x) (b \tan (c+d x))^n \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx &=\frac {\int (b \tan (c+d x))^{2+n} \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx}{b^2}\\ &=\frac {C (b \tan (c+d x))^{3+n}}{b^3 d (3+n)}+\frac {\int (b \tan (c+d x))^{2+n} (A-C+B \tan (c+d x)) \, dx}{b^2}\\ &=\frac {C (b \tan (c+d x))^{3+n}}{b^3 d (3+n)}+\frac {B \int (b \tan (c+d x))^{3+n} \, dx}{b^3}+\frac {(A-C) \int (b \tan (c+d x))^{2+n} \, dx}{b^2}\\ &=\frac {C (b \tan (c+d x))^{3+n}}{b^3 d (3+n)}+\frac {B \text {Subst}\left (\int \frac {x^{3+n}}{b^2+x^2} \, dx,x,b \tan (c+d x)\right )}{b^2 d}+\frac {(A-C) \text {Subst}\left (\int \frac {x^{2+n}}{b^2+x^2} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {C (b \tan (c+d x))^{3+n}}{b^3 d (3+n)}+\frac {(A-C) \, _2F_1\left (1,\frac {3+n}{2};\frac {5+n}{2};-\tan ^2(c+d x)\right ) (b \tan (c+d x))^{3+n}}{b^3 d (3+n)}+\frac {B \, _2F_1\left (1,\frac {4+n}{2};\frac {6+n}{2};-\tan ^2(c+d x)\right ) (b \tan (c+d x))^{4+n}}{b^4 d (4+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.31, size = 110, normalized size = 0.83 \begin {gather*} \frac {\tan ^3(c+d x) (b \tan (c+d x))^n \left (C (4+n)+(A-C) (4+n) \, _2F_1\left (1,\frac {3+n}{2};\frac {5+n}{2};-\tan ^2(c+d x)\right )+B (3+n) \, _2F_1\left (1,\frac {4+n}{2};\frac {6+n}{2};-\tan ^2(c+d x)\right ) \tan (c+d x)\right )}{d (3+n) (4+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.42, size = 0, normalized size = 0.00 \[\int \left (\tan ^{2}\left (d x +c \right )\right ) \left (b \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )+C \left (\tan ^{2}\left (d x +c \right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (b \tan {\left (c + d x \right )}\right )^{n} \left (A + B \tan {\left (c + d x \right )} + C \tan ^{2}{\left (c + d x \right )}\right ) \tan ^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {tan}\left (c+d\,x\right )}^2\,{\left (b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n\,\left (C\,{\mathrm {tan}\left (c+d\,x\right )}^2+B\,\mathrm {tan}\left (c+d\,x\right )+A\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________